package gui.jmenubar.jmenu;

import gui.jtab.JTabInterface;

import java.util.ArrayList;

import javax.swing.JMenuItem;

public abstract class JMenuApp extends javax.swing.JMenu{

	protected JTabInterface jTab;
	
	protected ArrayList<JMenuItem> menuList = new ArrayList<JMenuItem>();
	
	public JTabInterface getJTab() {
		return jTab;
	}

	public void setJTab(JTabInterface tab) {
		jTab = tab;
		if(jTab!=null)
			jTab.makeCurrentContext();
	}
	
	public void setVisible(int i,boolean visible){
		menuList.get(i).setVisible(visible);
	}
}
